const mongoose = require("mongoose");
const shopsSchema = new mongoose.Schema({
    serial: Number,//门店序号
    name: String, // 门店名
    address: String, //门店地址
    telephone: String, // 门店电话
    desc: String, // 门店描述
    isAvail: String, // 门店状态
    adminId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "usersModel"
    },  // 该, // 所属门店管理员id 
    goodsId: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: "goodsModel"
    }],  // 该门店下面的商品集和
    servicesId: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: "servicesModel"
    }], // 该门店下面服务的集合

});

module.exports = mongoose.model("shopsModel", shopsSchema, "shops");